<template>
<view>
	<view class="header">
		数据中心
	</view>
	<view class="content" v-if="oaRole == 1 || oaRole == 3">
		<!--第一行公共全部都可以用-->
		<view class="row">
			<view class="row_init border_right" @click="jump('../loss/index')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">盈亏统计</view>
			</view>
			<view class="row_init border_right" @click="jump('../money/index')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">营业额</view>
			</view>
			<view class="row_init border_right" @click="jump('./table')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">报表统计</view>
			</view>
		</view>
		<view class="row">
			<view class="row_init border_right" @click="jump('../inc/index')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">增长率统计</view>
			</view>
			<view class="row_init border_right" @click="jump('./user')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">客户分析</view>
			</view>
			<view class="row_init border_right" @click="jump('../my/index')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">业绩统计</view>
			</view>
		</view>
		<view class="row">
			<view class="row_init border_right" @click="jump('../my/manual')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">手工报表</view>
			</view>
			<view class="row_init border_right" @click="jump('../goods/sheet')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">盘点表</view>
			</view>
		</view>
	</view>
	<view class="content" v-else>
		<!--第一行公共全部都可以用-->
		<view class="row">
			<view class="row_init border_right" @click="jump('../my/index')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">业绩统计</view>
			</view>
			<view class="row_init border_right" @click="jump('../my/manual')">
				<image src="/static/system/use.png"></image>
				<view class="row_init_content">手工报表</view>
			</view>
		</view>
	</view>
</view>
</template>

<script>
import request from '@/util/request.js'
export default {
	data() {
		return {
			//oaRole 1:店长2:员工3:商户
			oaRole:0
		}
	},
	onLoad:function(){
		this.oaRole = uni.getStorageSync('oaRole')
		//this.oaRole = 2;
	},
	methods: {
		jump:function(url){
			uni.navigateTo({
			  url:url
			})
		},
	}
}
</script>

<style>

.header{
	width:100%;
	height:150rpx;
	line-height: 150rpx;
	text-align: center;
	color:#FFFFFF;
	background:linear-gradient(to right,#FF7800,#ffa14d);
	font-weight: bold;
	font-size:18px;
}
.content{
    display: flex;
    flex-direction: column;
    background:#e6e6e6;
    width:100%;
    padding-left:2%;
    padding-bottom: 20rpx;
    padding-top:20rpx;
}
.row{
    width:96%;
    display: flex;
    flex-direction: row;
    background:#fff;
    border-bottom:1px solid #e6e6e6;
    font-size:12px;
}
.border_right{border-right:1px solid #e6e6e6}
.row_init{
    width:33.2%;
    height:180rpx;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.row_init image{
    width:60rpx;height:60rpx;
}
.row_init_content{
    width:100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
	margin-top:20rpx;
	font-size: 16px;
	font-weight: bold;
}
</style>
